SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vwbAlumnoDivision
AS
SELECT     dbo.tb_AlumnoDivision.idRelDivisionAlumno AS ID, dbo.tb_AlumnoDivision.Alumno, dbo.tb_Divisionestemp.Mnemo AS Descripcion, 
                      dbo.tb_Alumnos.Documento, dbo.tb_Alumnos.Apellidos, dbo.tb_AlumnoDivision.AnioLectivo
FROM         dbo.tb_AlumnoDivision INNER JOIN
                      dbo.tb_Alumnos ON dbo.tb_AlumnoDivision.Alumno = dbo.tb_Alumnos.idAlumno INNER JOIN
                      dbo.tb_Divisionestemp ON dbo.tb_AlumnoDivision.Division = dbo.tb_Divisionestemp.idDivision

GO
GRANT SELECT ON  [dbo].[vwbAlumnoDivision] TO [Alumnos]
GRANT SELECT ON  [dbo].[vwbAlumnoDivision] TO [Informatica]
GRANT SELECT ON  [dbo].[vwbAlumnoDivision] TO [SoloVer]
GO
